package edu.ahut.spring;

import edu.ahut.spring.pojo.Category;
import edu.ahut.spring.pojo.Product;
import org.junit.Test;

import java.util.logging.Logger;

public class TestSpring0b {
    @Test
    public void testCreateObject() {
        Category c = null;
        c = new Category();
        c.setName("category1");
        Logger.getLogger(getClass().getName()).info(c.getName());



        Product p=new Product();
        p.setName("product1");
        p.setCategory(c);

        Logger.getLogger(getClass().getName()).info(String.valueOf(p));
        c.setName("category1new ");
        Logger.getLogger(getClass().getName()).info(String.valueOf(p));
    }

}

//Ctrl + /   注释代码
//Ctrl + Alt +L 格式化代码
